# uncompyle6 version 3.9.0
# Python bytecode version base 3.7.0 (3394)
# Decompiled from: Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
# Embedded file name: C:\Users\myh\Desktop\juqi\juqidjango\juqidjango\juqi_server\quanjushang\models.py
# Compiled at: 2023-02-06 17:35:16
# Size of source mod 2**32: 3431 bytes
from django.db import models
from wxcloudrun.models import BaseModel


class QuanjushangBindMethod(BaseModel):
    game_uuid = models.UUIDField(verbose_name="对局GAMEuuid")
    method_uuid = models.UUIDField(verbose_name="玩法模式uuid")

    class Meta:
        db_table = "QuanjushangBindMethod"
        indexes = [
            models.Index(fields=["uuid"]),
            models.Index(fields=["deleted"]),
            models.Index(fields=["createdAt"]),
            models.Index(fields=["game_uuid"]),
            models.Index(fields=["method_uuid"]),
        ]


class QuanjushangGame(BaseModel):
    # 0未上架 1上架
    state = models.IntegerField(default=0)
    name = models.CharField(max_length=100, verbose_name="对局名称")
    cover_url = models.CharField(max_length=255, verbose_name="封面url")
    user_limit = models.IntegerField(default=1, verbose_name="用户抽奖限制")
    price = models.PositiveIntegerField(verbose_name="抽奖价格")
    game_num = models.PositiveIntegerField(verbose_name="游戏局数")
    hide_stats = models.IntegerField(
        default=0, verbose_name="隐藏状态"
    )  # 0未开启 1开启后 充值大于多少金额的才可以开启

    explain = models.UUIDField(null=True, verbose_name="说明uuid")

    score_pay = models.IntegerField(default=0, verbose_name="是否只允许积分支付")
    is_care = models.IntegerField(default=0, verbose_name="空车赏")
    is_ccs = models.IntegerField(default=0, verbose_name="串串赏")
    is_fjf = models.IntegerField(default=0, verbose_name="空车返积分")
    fjf_num = models.IntegerField(default=0, verbose_name="返积分数值")

    class Meta:
        db_table = "QuanjushangGame"
        indexes = [
            models.Index(fields=["uuid"]),
            models.Index(fields=["deleted"]),
            models.Index(fields=["createdAt"]),
            models.Index(fields=["name"]),
            models.Index(fields=["is_care"]),
            models.Index(fields=["is_ccs"]),
        ]


class QuanjushangSonGame(BaseModel):
    """
    全局赏箱子
    """

    game_uuid = models.UUIDField(verbose_name="对局GAMEuuid")
    user_limit = models.IntegerField(default=1, verbose_name="用户抽奖闲置")
    price = models.IntegerField(verbose_name="单词抽奖价格")
    stats = models.IntegerField(default=1, verbose_name="是否可抽")
    box_num = models.IntegerField(default=1, verbose_name="箱子号码")

    class Meta:
        db_table = "QuanjushangSonGame"
        indexes = [
            models.Index(fields=["uuid"]),
            models.Index(fields=["game_uuid"]),
            models.Index(fields=["deleted"]),
            models.Index(fields=["createdAt"]),
        ]


class QuanjushangGood(BaseModel):
    """
    商品bind到箱子
    """

    # 绑定到箱子
    son_uuid = models.UUIDField(verbose_name="箱子uuid")
    good_uuid = models.UUIDField(verbose_name="商品uuid")
    count = models.IntegerField(verbose_name="总数量")
    rf_count = models.IntegerField(default=0, verbose_name="剩余数量")
    # 空车数量和串串 获得触发数量
    num = models.IntegerField(default=0)
    # 0普通商品 1全局赏 2空车赏 3串串赏
    good_type = models.IntegerField(default=0, verbose_name="商品类型")
    good_title = models.CharField(max_length=255, verbose_name="左上角展示商品类型的")
    price = models.PositiveIntegerField(default=0, verbose_name="商品价值")
    recovery_price = models.PositiveIntegerField(default=0, verbose_name="回收价值")
    good_name = models.CharField(max_length=255, verbose_name="商品名称")
    good_desc = models.CharField(max_length=255, verbose_name="商品描述")
    good_url = models.CharField(max_length=255, verbose_name="商品url")
    good_descurl = models.CharField(max_length=255, verbose_name="商品descurl")

    class Meta:
        db_table = "QuanjushangGood"
        indexes = [
            models.Index(fields=["uuid"]),
            models.Index(fields=["son_uuid"]),
            models.Index(fields=["deleted"]),
            models.Index(fields=["count"]),
            models.Index(fields=["createdAt"]),
            models.Index(fields=["good_uuid"]),
            models.Index(fields=["rf_count"]),
            models.Index(fields=["good_title"]),
            models.Index(fields=["good_name"]),
            models.Index(fields=["good_type"]),
        ]


class QuanjushangRecord(BaseModel):
    user_uuid = models.UUIDField(verbose_name="用户uuid")
    game_uuid = models.UUIDField(verbose_name="池子uuid")
    good_uuid = models.UUIDField(verbose_name="商品uuid")
    songame_uuid = models.UUIDField(verbose_name="箱子uuid")
    seat_number = models.IntegerField(default=1, verbose_name="座位号")

    class Meta:
        db_table = "QuanjushangRecord"
        indexes = [
            models.Index(fields=["uuid"]),
            models.Index(fields=["deleted"]),
            models.Index(fields=["createdAt"]),
            models.Index(fields=["good_uuid"]),
            models.Index(fields=["user_uuid"]),
            models.Index(fields=["game_uuid"]),
            models.Index(fields=["songame_uuid"]),
        ]


# okay decompiling models.cpython-37.pyc
